package main;




@SuppressWarnings("serial")
public class ErrorException extends Exception 
{
	private ErrorDefine m_error;
	private String m_message;
	
	public ErrorException(ErrorDefine error, String message) 
	{
		super();
		m_error = error;
		m_message = message;
	}
	
	public ErrorException(ErrorDefine error, StringBuffer message)
	{
		super();
		m_error = error;
		m_message = message.toString();
	}
	
	private String getPositionString()
	{
		/*if(ScriptTable.m_currentRow < 0)
		{
			return "";
		}
		int col = ScriptRow.m_currentCell;
		String out = "";
		if(col == 0)
		{
			out = "A";
		}
		while(col > 0)
		{
			char temp = (char)(col % 26 + 'A');
			out = temp + out;
			col /= 26;
		}
		return " row:" + (ScriptTable.m_currentRow + 1) + " col:" + out;*/
		return "";
	}
	
	public String toString()
	{
		return m_error.getMessage() + m_message + getPositionString();
	}
}
